Skip to content

Refactor conditionals in action workflows to remove unnecessary syntax#31

Merged
javidahmed64592 merged 1 commit intomainfrom
remove-brackets
Mar 6, 2026
Merged

Refactor conditionals in action workflows to remove unnecessary syntax#31
javidahmed64592 merged 1 commit intomainfrom
remove-brackets

Conversation

@javidahmed64592
Copy link
Owner

This pull request updates the conditional syntax used in GitHub Actions workflow and composite action files. The main improvement is switching from the older ${{ ... }} expression syntax to the newer, simpler if: github.event.repository.name == 'template-python' style. This change makes the workflow definitions cleaner and more consistent.

Updates to conditional syntax in workflow files:

  • .github/workflows/build.yml: Changed all if conditions to use the new syntax for both build-wheel and verify-structure jobs.
  • .github/workflows/ci.yml: Updated if conditions for all CI jobs (validate-pyproject, ruff, mypy, pytest, bandit, pip-audit, version-check) to use the new syntax.

Updates to conditional syntax in composite actions:

  • .github/actions/build/build-wheel/action.yml: Updated if conditions for installing Python core dependencies.
  • .github/actions/build/verify-structure/action.yml: Updated if conditions for installing Python core dependencies.
  • .github/actions/ci/bandit/action.yml, .github/actions/ci/mypy/action.yml, .github/actions/ci/pip-audit/action.yml, .github/actions/ci/pytest/action.yml, .github/actions/ci/ruff/action.yml, .github/actions/ci/validate-pyproject/action.yml, .github/actions/ci/version-check/action.yml: Updated if conditions for installing Python dev dependencies. [1] [2] [3] [4] [5] [6] [7]

Updates to setup actions:

  • .github/actions/setup/install-python-core/action.yml, .github/actions/setup/install-python-dev/action.yml: Updated if conditions for installing UV Python dependencies. [1] [2]

@javidahmed64592 javidahmed64592 merged commit ab21623 into main Mar 6, 2026
9 checks passed
@javidahmed64592 javidahmed64592 deleted the remove-brackets branch March 6, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant